package com.myphoto.base.log.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.myphoto.base.log.vo.P6spyLogVO;
import com.myphoto.base.log.vo.SysLogVO;
import com.myphoto.base.log.vo.UrlLogVO;
import com.myphoto.base.mybatis.log.entity.TbLogP6spyEntity;
import com.myphoto.base.mybatis.log.entity.TbLogSysEntity;
import com.myphoto.base.mybatis.log.entity.TbLogUrlEntity;

public interface LogService {

    /**
    * @description 日志信息保存到数据库
    * @author 方安伦
    * @date 2021/11/25 14:55
    * @param sysLogEntity
     **/
    void saveSysLog(TbLogSysEntity sysLogEntity);

    /**
    * @description 将P6spy性能监控日志信息保存到数据库
    * @author 方安伦
    * @date 2021/11/25 14:55
    * @param msg
     **/
    void writeDB(String msg) throws Exception;

    /**
    * @description 将URL请求时间记录保存到数据库
    * @author 方安伦
    * @date 2021/11/26 11:24
    * @param logUrlEntity
     **/
    void saveUrlMonitor(TbLogUrlEntity logUrlEntity) throws Exception;

    /**
    * @description 查询系统日志列表
    * @author 方安伦
    * @date 2021/12/14 11:02
    * @param page,sysLogVO
    * @return IPage<TbLogSysEntity>
     **/
    IPage<TbLogSysEntity> loadSysLogList(Page<TbLogSysEntity> page, SysLogVO sysLogVO) throws Exception;

    /**
    * @description 查询P6spy日志列表
    * @author 方安伦
    * @date 2021/12/16 9:24
    * @param page,p6spyLogVO
    * @return IPage<TbLogP6spyEntity>
     **/
    IPage<TbLogP6spyEntity> loadP6spyLogList(Page<TbLogP6spyEntity> page, P6spyLogVO p6spyLogVO) throws Exception;

    /**
    * @description 查询Url日志列表
    * @author 方安伦
    * @date 2021/12/16 9:34
    * @param page,urlLogVO
    * @return IPage<TbLogUrlEntity>
     **/
    IPage<TbLogUrlEntity> loadUrlLogList(Page<TbLogUrlEntity> page, UrlLogVO urlLogVO) throws Exception;

    /**
    * @description 查询系统日志详情
    * @author 方安伦
    * @date 2021/12/16 11:40
    * @param id
    * @return TbLogSysEntity
     **/
    TbLogSysEntity loadSysLogDetail(String id) throws Exception;

    /**
    * @description 查询P6spy日志详情
    * @author 方安伦
    * @date 2021/12/16 11:42
    * @param id
    * @return TbLogP6spyEntity
     **/
    TbLogP6spyEntity loadP6spyLogDetail(String id) throws Exception;

    /**
    * @description 查询Url日志详情
    * @author 方安伦
    * @date 2021/12/16 11:44
    * @param id
    * @return TbLogUrlEntity
     **/
    TbLogUrlEntity loadUrlLogDetail(String id) throws Exception;
}
